package com.zzx.schoolfellow.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zzx.schoolfellow.mapper.ChatMessageMapper;
import com.zzx.schoolfellow.model.dto.ChatMessageDTO;
import com.zzx.schoolfellow.model.entity.ChatMessage;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

@Service
public interface ChatMessageService extends IService<ChatMessage> {
    ChatMessage createMessage(ChatMessageDTO messageDTO);

    List<ChatMessage> getMessages();

    List<ChatMessage> getMessage(String id);

    void deleteMessage(String id);

    void sendMessage(ChatMessage message); // 发送消息
    List<ChatMessage> getMessageList(Integer fromUser, Integer toUser);  // 获取消息记录
}
